package start.spring.basic.exinterface.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import start.spring.basic.exinterface.common.ExInterfaceConstant;
import start.spring.basic.log.ServiceLog;
import start.spring.basic.response.ResponseData;

/**
 * ****************************************************************************
 * 资源测试入口类
 *
 * @author(作者)：xuyongyun	
 * @date(创建日期)：2018年9月27日
 ******************************************************************************
 */
@RestController
public class ResourceController {
	
	@Value("${application.version}")
	private String yybb;
	
	@ServiceLog(businessType = "查询对外接口包版本", systemType = ExInterfaceConstant.SYSTEM_TYPE, recordResult = false, userId = "")
	@RequestMapping(value="/resource/test/version",method=RequestMethod.GET)
	@ResponseBody
	public ResponseData<String> testVersion(HttpServletRequest request,
			HttpServletResponse response) throws InterruptedException{
		return ResponseData.successData(yybb);
    }
	
}
